home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 3 / CD ACTUAL 3.iso / linux / incoming / jstools-.6v3 / jstools- / jstools-tk3.6v3.0 / lib / jdoc / jdoc.jdoc < prev    next >
Encoding:
Text File  |  1995-03-14  |  19.9 KB  |  172 lines

  1. {The jdoc Document Viewer
  2.  
  3. Introduction
  4. The jdoc application was developed as a tool for displaying online manuals for Tk¡based applications.  It can be used to display other kinds of multi¡font hypertext documents as well.  In addition to being able to follow hypertext links, you can quickly jump to any major section in the document you're viewing.
  5.  
  6. The jdoc document viewer is distributed as part of the jstools package.
  7.  
  8. This help file describes jdoc version 3.6/3.0.
  9.  
  10. The jdoc viewer is a rewrite of jhelp, which was used to display help files in previous releases of jstools.  Unfortunately, jdoc can't read jhelp's file format.  A version of jhelp is included with jstools 3.6/3.0 for people who want to read documentation in the old format, but I'm no longer maintainng it, and it probably won't be distributed with future versions of jstools.
  11.  
  12. Copyright and contact information is available in the jstools documentation.
  13.  
  14. Invocation
  15.     jdoc [topic]
  16.  
  17. To view a document, type `jdoc topic' at the Unix shell prompt, assuming jdoc is in your path.  You'll get an error message if no file can be found for the topic you specify.  If the requested topic can't be found, an alert box will tell you so.
  18.  
  19. The jdoc application is used to display help files for jstools applications, so it is also invoked for you by those applications when you choose their `Help' commands.
  20.  
  21. See Documents for information on how jdoc looks up topic names.
  22.  
  23. If you don't specify topic, you'll be prompted to choose a document from a list of available topics.
  24.  
  25. Buttons
  26. There are three buttons at the bottom of the document window:
  27.  
  28. Done
  29. The `Done' button closes the window and quits the document viewer.  (It's the same as choosing `Quit' from the `Doc Viewer' menu.)
  30.  
  31. Load...
  32. The `Load...' button brings up a panel that lets you choose a new document from a list.  (It's the same as choosing `Load...' from the `Document' menu.)  See Documents for information on how jdoc finds the available documents.
  33.  
  34. Print
  35. The `Print' button sends the document as PostScript to the current printer, after asking for confirmation.  (It's the same as choosing `Print' from the `Document' menu.)
  36.  
  37. Find...
  38. The `Find...' button brings up the Find Panel, which lets you search for text in the document you're viewing.  (It's the same as choosing `Find...' from the `Document' menu.)
  39.  
  40. The Sections Menu
  41. The sections of the document are listed under the `Sections' menu (where each top¡level heading starts a new section), and you can jump to a particular section by choosing it from the menu.  The document window will scroll so that the section you chose is displayed at the top.  (Of course, you can also scroll through the document with the scrollbar.)
  42.  
  43. The Document Menu
  44. Load...
  45. Choosing `Load...' from the `Document' menu brings up a panel that lets you choose a new document from a list of the available documents.  (See  for information on how jdoc finds the available documents.)  To choose a document, click on its name to select it, and then click `OK'.  (You can also double¡click on a title, but there's a bug that sometimes pops up a harmless error message when you do.)
  46.  
  47. Save As...
  48. Choosing `Save As...' from the `Document' menu brings up a File Selector Panel that lets you save the current document in one of three formats: TeX source, HTML, or the Tcl¡syntax rich¡text format used by the jrichtext.tcl library.  If you have TeX available, saving a document as TeX source and typesetting that is probably the best way to get hardcopy of a jdoc document.
  49.  
  50. Print
  51. Choosing `Print' from the `Document' menu pops up a panel asking you to confirm that you want to print to the current printer, which must be a PostScript printer.  If you click OK, the document you're viewing is converted to PostScript and the PostScript is sent to the printer.
  52.  
  53. If you don't have a PostScript printer, you may be able to generate hardcopy using one of the formats available via the `Save As...' command.
  54.  
  55. Find...
  56. Choosing `Find...' from the `Document' menu brings up the Find Panel, which lets you search for text in the document you're viewing.
  57.  
  58. The Doc Viewer Menu
  59. Help with Doc Viewer
  60. You can get help about the jdoc application - this file - by choosing `Help with Doc Viewer' from the `Help' menu.  This starts up another copy of jdoc displaying jdoc's help document.
  61.  
  62. About the Doc Viewer...
  63. `About the Doc Viewer' under the `Help' menu displays an information panel with copyright information.  The panel also lets you get more information about the author (me), and about the Tk/Tcl scripting environment..
  64.  
  65. Global Preferences...
  66. This command brings up the jstools Global Preferences panel, which lets you set preferences common to all the jstools applications.
  67.  
  68. Doc Viewer Preferences...
  69. This command brings up the jdoc preferences panel, described below under Doc Viewer Preferences.
  70.  
  71. Issue Tcl Command...
  72. `Issue Tcl Command...' brings up a panel that prompts you for a Tcl command to be executed.  This is mainly useful for debugging.
  73.  
  74. Issue Unix Command...
  75. This brings up a panel that prompts you for a Unix command to be executed.  If the command produces any output, it will be displayed; otherwise you'll see a notice to that effect.  If there are any errors in the execution of the command, you'll see an error dialogue box with the error message returned by the command.  This command doesn't have any effect on the document you're viewing; it's just a convenience.
  76.  
  77. Quit
  78. This quits the program (asking for confirmation first if you've chosen `Confirm Actions' on the Global Preferences panel).  It's the same as clicking  the Quit button.
  79.  
  80. Documents
  81. The documents displayed by jdoc are files in a rich¡text format that can be created and edited by jedit's jdoc mode.  The actual file format is the same as that used by the richtext mode of jedit.  Their names must end in .jdoc.  (By default, jedit will open or create files ending in .jdoc in its jdoc mode, and it will open or create files ending in .jrt in its richtext mode.)
  82.  
  83. In some circumstances, such as specifying a topic on the command line, you can leave off the trailing .jdoc from a document name; it doesn't hurt to include it, though.
  84.  
  85. How Documents Are Found
  86. If a document is specified as a full pathname, that file is opened.  If (as is usually the case) a relative pathname is specified, however, the following directories will be searched for the file until it is found:
  87. * the current directory
  88. * tk/jdoc in your home directory
  89. * .tk/jdoc in your home directory
  90. * jdoc in the system¡wide jstools library directory (typically /usr/local/lib/jstools)
  91. * jdoc in the system¡wide Tk library directory (typically /usr/local/lib/tk)
  92.  
  93. A relative pathname can include a directory component, so that for instance the document name jeditmodes/jdoc.jdoc would find a file named /usr/local/lib/jstools/jdoc/jeditmodes/jdoc.jdoc.  This is useful for grouping related documents together, and for `hiding' documents that are designed to be referenced only from within other documents, rather than being selected by the user.
  94.  
  95. When you choose `Load...' or invoke jdoc without a document name, jdoc constructs the list of available documents by looking for files ending in .jdoc in the above directories.  (However, it doesn't search subdirectories of the above directories.)
  96.  
  97. Creating Documents
  98. Note:  This material is covered in more detail in the documentation for jedit's jdoc mode.
  99.  
  100. To create a document for display by jdoc, simply edit a file whose name ends in .jdoc with the jedit editor.  A `jdoc' menu will be available to help you construct cross¡references, and the `Format' menu will let you compose multi¡font text.
  101.  
  102. The very first line of your document should be an overall title for the document, and you should use `Make Overall Topic Title' to put this in the right font.  (It's possible that future versions of jdoc will use this when constructing the list of available topics, or when converting to other formats.)  No other text in the document should be marked as an overall topic title.
  103.  
  104. The document should be divided into sections, and each section should have a section title (created with `Make Section Title').  The user will be able to navigate among these sections with the Sections menu, which is constructed from the section titles.  (In the future, some sort of automatic table¡of¡contents or index may also use this information.)
  105.  
  106. You can further divide a section by preceding subsections with a subsection heading with `Make Subsection Heading'.  If you need further subdivisions, you can use the various heading styles under the `Font' sub¡menu of the `Format' menu.
  107.  
  108. You can create a cross reference to another document by highlighting the document name (or the phrase you want to link to the document) and choosing `Cross Reference...'.  A panel will appear asking you to confirm (or specify) the document to link to.  You need to include the trailing .jdoc in the document name.
  109.  
  110. You can also make a cross¡reference to another point in the current document by using a hash mark (#) followed by an anchor name (for which see below) instead of a document name.  For instance, `#Preferences' would link to the anchor named `Preferences' in the current document.
  111.  
  112. An anchor is a particular piece of text (typically a heading or subheading) which is given a particular name.  The anchor name isn't actually displayed anywhere when the user is viewing the document, and it is entirely arbitrary.  It's only used to identify a particular position in the text.  (For this reason, it's not useful to have more than one anchor in a document with the same name.)
  113.  
  114. You can create an anchor by selecting text and choosing `Anchor Name...'; a name will be suggested for you based on the selected text.  An anchor name should not have any spaces or `+' or `-' signs in it.
  115.  
  116. You can link to a particular point in another document by specifying the document name, then a hash mark, then the anchor name.  For instance, `jstools.jdoc#Usage' would link to the anchor named `Usage' in the document jstools.jdoc.
  117.  
  118. (You can also create links to http: and ftp: URL's, as used by the World Wide Web, by specifying the full URL, and to HTML documents by specifying a pathname ending in .html, but these will only be displayed properly if Mosaic is available.  See also Future Directions.)
  119.  
  120. You can link to a Unix manual page entry by selecting the manual page name and choosing `Man Page Reference'.
  121.  
  122. The `Show Tags at Insert' command is useful for figuring out the name of an anchor, or what a cross¡reference is pointing to.
  123.  
  124. Doc Viewer Preferences...
  125. Choosing `Doc Viewer Preferences...' from the `Doc Viewer' menu brings up the Doc Viewer Preferences panel, which lets you customise the appearance of the text window that displays a document.  It lets you set the overall width and height of the window (in characters), the colours used to display your text, the width of the raised border drawn around selected text, and the width of the blank border around the entire text window.
  126.  
  127. The buttons labelled `RGB' let you select a colour by manipulating sliders that represent the individual red, green, and blue components of the colour you're choosing.  The buttons labelled `Name' let you select a colour by name, from the list of colours known on your system.
  128.  
  129. (Note: If the name of the colour database on your system isn't /usr/lib/X11/rgb.txt, then the `Name' colour buttons won't list all the colours available.)
  130.  
  131. (Many of the preferences you can set in the jstools Global Preferences panel also affect the document viewer.  You can bring up the Global Preferences panel by choosing `Global Preferences...' from the `Doc Viewer' menu.)
  132.  
  133. Doc Viewer preferences are stored in the file ~/.tk/jdoc-defaults.  (Global preferences are saved in the file ~/.tk/defaults.)
  134.  
  135. Customising jdoc
  136. jdoc supports the standard jstools customisation mechanisms.  You should consult the general jstools customisation documentation as well as the description below.
  137.  
  138. The ~/.tk/jdoc.tcl startup script
  139. The file ~/.tk/jdocrc.tcl can contain Tcl code to customise your document viewing environment.  For most purposes, you'll need to know Tcl and Tk, and look at the code for the document viewer, in order to create a useful startup script.  (You may also find it useful to look at the documentation for the various jstools libraries, which are used extensively by the file viewer.)
  140.  
  141. Sample files
  142. If jdoc was installed normally at your site, the directory /usr/local/lib/tk/jdoc/samples should contain some example files which you can copy, rename appropriately, and modify to your liking.  (You may also find it useful to look at the jdoc script itself, and for information about Tcl syntax you should consult the various Tcl and Tk man pages.)
  143.  
  144. Evolution
  145. Feel free to report bugs (and feature requests) to me, <js@bu.edu>, and I will try to deal with them.  Also, feel free to fix bugs or add features on your own and let me know how you did it.
  146.  
  147. Bugs and Misfeatures
  148. * The behaviour of the Find panel (searching from an invisible insert point) is confusing.
  149.  
  150. * If you move the mouse while double¡clicking on a title in the `Load...' panel, a bug in the mouse bindings is triggered and pops up a notification panel.
  151.  
  152. * The `Load...' panel should be a lot fancier.  Perhaps there should be a database of document titles, as distinct from filenames, and the `Load...' panel should display the longer titles.
  153.  
  154. * When you `Save As...', hypertext links are lost in the saved file, even if you're saving in a format that supports the concept.
  155.  
  156. * The underlining that indicates links hides the underscore character; this is a particular problem with programming documentation.
  157.  
  158. Future Directions
  159. * There should be preferences for fonts.
  160.  
  161. * The user should be able to customise how links are shown, perhaps using a different colour or a raised border instead of underlining them.
  162.  
  163. * There should be a straightforward way to print from within the application.
  164.  
  165. * I want to standardise bindings for non¡editable text widgets and put them in the bindings libraries in some fashion.
  166.  
  167. * The Find panel should work differently; it should highlight all the found strings, and then let you jump back and forth among them.
  168.  
  169. * The mechanism to display Unix manual pages and URL's should be configurable by the user (e.g. to use TkMan or lynx(l))
  170.  
  171. * I'd like to support a mechanism for making documents available in multiple languages and selecting the right one, if available, based on a user¡settable or site¡wide preference.
  172. } {{{jdoc:xref:link {6.55 6.62 10.32 10.37 10.100 10.107 12.0 12.33 12.50 12.75 19.55 19.62 21.4 21.13 32.158 32.167 38.35 38.45 48.59 48.78 48.209 48.222 51.212 51.235 53.121 53.131 56.58 56.68 66.23 66.59 69.73 69.95 78.92 78.120 81.98 81.103 81.106 81.115 81.173 81.181 98.72 98.77 98.80 98.89 100.95 100.100 118.251 118.268 131.40 131.70 136.14 136.59 136.85 136.128 139.300 139.329}} {jdoc:xref:manpage {169.112 169.116}} {jdoc:anchor:anchorname {3.0 4.0 14.0 15.0 25.0 26.0 40.0 41.0 43.0 44.0 47.0 48.0 58.0 59.0 80.0 81.0 85.0 86.0 97.0 98.0 124.0 124.22 135.0 136.0 144.0 145.0 158.0 159.0}} {richtext:font:roman {2.0 3.0 4.0 4.4 4.8 6.4 6.8 6.55 6.62 8.25 8.29 10.4 10.8 10.32 10.37 10.100 10.107 10.125 10.129 10.141 10.146 10.176 10.181 10.199 10.206 10.370 10.377 12.54 12.61 14.0 15.6 15.7 15.12 17.26 17.36 17.73 17.77 19.4 19.8 19.55 19.62 20.0 21.0 21.4 21.13 21.37 21.41 23.21 23.26 25.0 26.0 28.0 29.0 31.0 32.0 32.158 32.167 32.191 32.195 34.0 35.0 37.0 38.0 40.0 41.0 43.0 45.0 45.168 45.172 47.0 48.0 48.209 48.222 48.359 48.363 50.0 51.0 55.0 56.0 58.0 60.0 60.27 60.31 60.147 60.151 60.163 60.167 62.0 63.0 64.0 66.0 66.27 66.34 66.110 66.117 68.0 69.0 69.27 69.31 69.73 69.95 71.0 72.0 74.0 75.0 77.0 78.0 80.0 81.0 81.27 81.31 81.98 81.103 81.106 81.110 81.173 81.181 81.190 81.195 81.222 81.227 81.243 81.248 81.285 81.290 81.298 81.302 81.352 81.356 81.364 81.372 83.102 83.107 85.0 86.0 88.2 88.9 89.2 89.10 90.2 90.6 90.26 90.33 90.63 90.85 91.2 91.6 91.58 91.75 93.94 93.114 93.139 93.187 95.36 95.40 95.66 95.70 95.145 95.150 97.0 98.5 98.72 98.77 98.80 98.84 100.36 100.40 100.80 100.85 100.95 100.100 102.199 102.203 108.286 108.291 110.99 110.100 110.195 110.207 110.241 110.252 114.182 114.183 114.189 114.190 116.144 116.162 116.196 116.201 116.219 116.231 118.30 118.35 118.40 118.44 118.168 118.173 118.220 118.226 118.251 118.268 124.0 125.0 129.63 129.83 129.154 130.0 131.44 131.51 133.46 133.65 133.110 133.124 135.0 136.4 136.27 136.34 136.93 136.100 138.0 139.0 139.9 139.25 139.312 139.319 141.0 142.0 142.3 142.7 142.59 142.89 142.238 142.242 144.0 145.0 145.55 145.66 147.0 148.0 158.0 159.0 169.112 169.116 172.0}} {richtext:font:italic {15.7 15.12 17.31 17.36 23.21 23.26}} {richtext:font:bold {6.55 6.62 10.100 10.107 10.199 10.206 10.370 10.377 12.54 12.61 19.55 19.62 48.209 48.222 66.27 66.34 66.110 66.117 81.222 81.227 81.285 81.290 81.352 81.356 83.102 83.107 88.2 88.9 89.2 89.10 90.2 90.6 90.26 90.33 90.63 90.85 91.2 91.6 91.58 91.75 93.94 93.114 93.139 93.187 95.145 95.150 98.0 98.5 100.80 100.85 108.286 108.291 116.219 116.231 118.168 118.173 129.63 129.83 129.154 130.0 131.44 131.51 133.46 133.65 133.110 133.124 136.27 136.34 136.93 136.100 139.9 139.25 139.312 139.319}} {richtext:font:bolditalic {21.4 21.13 32.158 32.167 69.73 69.95 118.251 118.268}} {richtext:font:typewriter {4.4 4.8 6.4 6.8 8.25 8.29 10.4 10.8 10.32 10.37 10.125 10.129 10.141 10.146 10.176 10.181 15.0 15.6 17.26 17.31 17.73 17.77 19.4 19.8 20.0 21.0 21.37 21.41 32.191 32.195 45.168 45.172 48.359 48.363 60.27 60.31 60.147 60.151 60.163 60.167 69.27 69.31 81.27 81.31 81.98 81.103 81.106 81.110 81.173 81.181 81.190 81.195 81.243 81.248 81.298 81.302 81.364 81.372 95.36 95.40 95.66 95.70 98.72 98.77 98.80 98.84 100.36 100.40 100.95 100.100 102.199 102.203 110.99 110.100 110.195 110.207 110.241 110.252 114.182 114.183 114.189 114.190 116.144 116.162 116.196 116.201 118.30 118.35 118.40 118.44 118.220 118.226 136.0 136.4 142.3 142.7 142.59 142.89 142.238 142.242 145.55 145.66 169.112 169.116}} {richtext:font:heading0 {1.0 2.0}} {richtext:font:heading1 {3.0 4.0 14.0 15.0 25.0 26.0 40.0 41.0 43.0 44.0 58.0 59.0 80.0 81.0 124.0 125.0 135.0 136.0 144.0 145.0}} {richtext:font:heading2 {28.0 29.0 31.0 32.0 34.0 35.0 37.0 38.0 44.0 45.0 47.0 48.0 50.0 51.0 55.0 56.0 59.0 60.0 62.0 63.0 65.0 66.0 68.0 69.0 71.0 72.0 74.0 75.0 77.0 78.0 85.0 86.0 97.0 98.0 138.0 139.0 141.0 142.0 147.0 148.0 158.0 159.0}} {richtext:font:heading3 {64.0 65.0}} {jdoc:topic:jstools {6.55 6.62}} {jdoc:link:jstools.jdoc {6.55 6.62 10.100 10.107 12.50 12.75 19.55 19.62}} {jdoc:anchorname:Invocation {14.0 15.0}} {jdoc:link:jslibraries.jdoc {139.300 139.329}} {jdoc:link:jrichtext.tcl.jdoc {48.209 48.222}} {jdoc:link:#Doc_Viewer_Preferences {69.73 69.95}} {jdoc:anchorname:Doc_Viewer_Preferences {124.0 124.22}} {jdoc:link:jhelp.jdoc {10.32 10.37}} {jdoc:anchorname:Documents {80.0 81.0}} {jdoc:link:#Documents {21.4 21.13 32.158 32.167}} {jdoc:link:jedit.jdoc {81.98 81.103 98.72 98.77 100.95 100.100}} {jdoc:manpage:lynx {169.112 169.116}} {jdoc:anchorname:Future_Directions {158.0 159.0}} {jdoc:link:#Future_Directions {118.251 118.268}} {jdoc:link:panels/findpanel.jdoc {38.35 38.45 56.58 56.68}} {jdoc:anchorname:Introduction {3.0 4.0}} {jdoc:anchorname:Buttons {25.0 26.0}} {jdoc:anchorname:The_Sections_Menu {40.0 41.0}} {jdoc:anchorname:The_Document_Menu {43.0 44.0}} {jdoc:anchorname:The_Doc_Viewer_Menu {58.0 59.0}} {jdoc:anchorname:How_Documents_Are_Found {85.0 86.0}} {jdoc:anchorname:Customising_jdoc {135.0 136.0}} {jdoc:anchorname:Evolution {144.0 145.0}} {jdoc:link:panels/fileselector.jdoc {48.59 48.78}} {jdoc:link:panels/prefs.jdoc {66.23 66.59 78.92 78.120 131.40 131.70}} {jdoc:link:jstools/customisation.jdoc {136.14 136.59 136.85 136.128}} {jdoc:link:jstools.jdoc#Credits_and_Copyright {12.0 12.33}} {jdoc:link:jeditmodes/jdoc-mode.jdoc {81.106 81.115 98.80 98.89}} {jdoc:link:jeditmodes/richtext-mode.jdoc {81.173 81.181}} {jdoc:link:jstools/textconvert.jdoc {51.212 51.235}} {jdoc:link:#Save_As... {53.121 53.131}} {jdoc:anchorname:Save_As... {47.0 48.0}} {jdoc:anchorname:Creating_Documents {97.0 98.0}}} {{abbrevstart 153.0} {del_from 139.340} {matchend 48.40} {richptr 37.0} {abbrevend 153.0} {insert 1.0} {del_to 142.30} {anchor 152.146} {matchstart 48.32} {current 10.324}}}